//Gradient
@mixin gradient($start, $end) {
    background: $start; /* Old browsers */
    background: -moz-linear-gradient(top, $start 0%, $end 100%); /* FF3.6+ */
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,$start), color-stop(100%,$end)); /* Chrome,Safari4+ */
    background: -webkit-linear-gradient(top, $start 0%,$end 100%); /* Chrome10+,Safari5.1+ */
    background: -o-linear-gradient(top, $start 0%,$end 100%); /* Opera 11.10+ */
    background: -ms-linear-gradient(top, $start 0%,$end 100%); /* IE10+ */
    background: linear-gradient(to bottom, $start 0%,$end 100%); /* W3C */
}

//Box Shadows
@mixin box-shadow($top, $left, $blur, $color, $inset: "") {
    -webkit-box-shadow: $top $left $blur $color #{$inset};
    -moz-box-shadow: $top $left $blur $color #{$inset};
    box-shadow: $top $left $blur $color #{$inset};
}

//Transitions
@mixin transition($delay) {
    -webkit-font-smoothing: antialiased;
    -o-transition: $delay;
    -ms-transition: $delay;
    -moz-transition: $delay;
    -webkit-transition: $delay;
    transition: $delay;
}

//Rounded Corners
@mixin rounded($topleft, $topright, $bottomright, $bottomleft) {
    border-radius: $topleft $topright $bottomright $bottomleft;
    -moz-border-radius: $topleft $topright $bottomright $bottomleft;
    -webkit-border-radius: $topleft $topright $bottomright $bottomleft;
}

//Box Sizing
@mixin box-sizing($val) {
    box-sizing: $val;
    -webkit-box-sizing: $val;
    -moz-box-sizing: $val;
}

// Hide inline text
@mixin hide-text() {
    overflow: hidden;
    text-indent: 100%;
    white-space: nowrap;
    font-size: 0;
}

// TypeKit document classes
@mixin typekit() {
    html.wf-loading & {
        visibility: hidden;
    }
    html.wf-active &,
    html.wf-inactive &,
    html.no-js & {
        visibility: visible;
    }
}

// :before and :after pseudo elements
@mixin before-after() {
    position: absolute;
    content: "";
    @include hide-text();
}

// Automatically clear all floated children
// Blatantly stolen and adapted to SASS from: http://nicolasgallagher.com/micro-clearfix-hack/
@mixin clearfix() {
    &:before,
    &:after {
        content: " ";
        display: table;
    }
    &:after {
        clear: both;
    }
    // For IE 6/7 only
    & {
        *zoom: 1;
    }
}

// Media Queries
@mixin respond-to($media) {
    @if $media == smartphone {
        @media only screen and (max-width : $break-small) { @content; }
    }
    @else if $media == smartphone-landscape {
        @media only screen and (min-width : 481px) and (max-width : $break-small) { @content; }
    }
    @else if $media == smartphone-portrait {
        @media only screen and (max-width : 480px) { @content; }
    }
    @else if $media == tablet {
        @media only screen and (min-width : $break-small + 1px) and (max-width : $break-medium) { @content; }
    }
    @else if $media == tablet-landscape {
        @media only screen and (min-width : $break-medium + 1px) and (max-width : $break-large) { @content; }
    }
    @else if $media == tablet-portrait {
        @media only screen and (min-width : $break-small + 1px) and (max-width : $break-medium) { @content; }
    }
    @else if $media == desktop {
        @media only screen and (min-width: $break-large + 1px) { @content; }
    }
}

// Web font builder
@mixin web-font($font, $weight, $style: normal) {

    & {
        font-family: $font;
        font-weight: $weight;
        font-style: $style;
        visibility: hidden;
        text-rendering: optimizeLegibility;
        -webkit-font-smoothing: antialiased;
    }
    html.wf-loading & {
        visibility: hidden;
    }
    html.wf-active &,
    html.wf-inactive &,
    html.no-js & {
        visibility: visible;
    }
    html.ie7 & {
        font-family: $font;
        visibility: visible;
    }
}